package com.inkFlow.job.snailjob;


import com.aizuda.snailjob.client.job.core.annotation.JobExecutor;
import com.aizuda.snailjob.client.job.core.dto.JobArgs;
import com.aizuda.snailjob.client.model.ExecuteResult;
import com.aizuda.snailjob.common.core.util.JsonUtil;
import com.aizuda.snailjob.common.log.SnailJobLog;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @Description: 书源相关定时任务
 * @author: dingshuai
 * @date: 2025-08-12 15:19:37
 **/
@Component
public class BookSourceTask {

    /**
     * @Description 更新来自爬虫的小说
     * @author dingshuai
     * @date 2025-08-12 16:42:18
    **/
    @JobExecutor(name = "updateBookForCrawler",method = "updateBookForCrawler")
    public ExecuteResult updateBookForCrawler(JobArgs jobArgs){
        //控制台日志
        SnailJobLog.LOCAL.info("执行定时任务A，参数：{}",jobArgs);
        //上报日志到服务端
        SnailJobLog.REMOTE.info("执行定时任务A，参数：{}",jobArgs);
        return ExecuteResult.success("执行成功");
    }
}
